package org.example.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author zj@uinpay.cn
 * @Date 2024/8/19 10:44
 */
@RestController
public class TestController {

    @GetMapping("/get")
    @PreAuthorize("hasRole('admin') and authentication.name=='admin'")
    public String get() {
        return "1;";
    }
}
